Final Project

Group 1:

  • Hiba Awan

  • Nathania Stephens

Abstract

Introduction & Background

Motivation/ Purpose

In 2023, there were over 30,000 arrests and close to 65,000 citations in Fairfax County. The Fairfax County boundaries, include areas such as Centreville, Chantilly, Herndon, Reston, Tysons Corner, McLean, Merrifield, George Mason, Annadale, Burke, Springfield, Alexandria, Lorton to name a few. If you live, work, or study in these areas then this project should be of interest to you. This project aims to inform Fairfax County patrons of crime information and hopefully provide some statistical insights that could be applicable.

Goals/ Objectives

In order to provide relevant and insightful crime information, several different visualization methods were applied to help easily interpret and compare data. Statistical learning techniques were utilized to help understand statistic significantly factors and associations between variables. Since the data utilized for this project is largely categorical the project focuses on techniques such as Chi-Squared Test, Logistic Regression, Decision Trees and Random Forest.

Data

Overview

About the Data

Three datasets were pulled from the Fairfax County Police Department website. They covered arrest, citations, and warnings in the year 2023. For simplicity, general definitions are provided:

  • Arrest - When a person is taken into custody to answer for an offense or when there is a deprivation or restraint of a person’s liberty in any significant way.

  • Citation - Formal notice issued by law enforcement officer for a violation of law, typically related to traffic laws or other minor offenses. Typically requiring a violator to appear in court or pay a fine.

  • Warning - When a violation, typically minor, has been made but an officer issues a warning rather than a citation.

The data sets included between 24 and 34 variables, but some of many of the variables were redundant or were not applicable to the research (e.g. web_address, phone_number, name). The following attributes were key to the research conducted:

Column Name Data Type Description
Date Date Date of Violation
Time Chr Time of Violation
Offense Chr Description of Violation
Gender Chr Gender of Violator
Ethnicity Chr Hispanic or Non-Hispanic
District Chr Administrative area
Latitude Dbl Coordinates measuring north/ south of equator
Longitude Dbl Coordinates measuring east/ west of prime meridian
Outcome Chr Result of violation, arrest, citation, or warning

Limitations and Assumptions

Due to the nature of the data available on the Fairfax County Police Department website, analysis was limited to qualitative techniques. The approach taken for the project focused on predicting through qualitative responses or classification. This means that each record pulled from the Fairfax County Police Department (FCPD) would be assigned to a category or class.

While understanding local crime is the goal of this project, the data acquired only accounts for crime that was recorded by FCPD. It does not take into account crimes that were not report or any other crime that was not reported through FCPD channels.

Cleaning and Transformation

To address questions related to gender, the data needed to be standardized and correctly categorized. Column names needed to be consistent across the three datasets to merge. Gender was used over Sex. Next the column data would be transformed to consistent labels, e.g. Male, Female, and Other/Unknown. Total proportion for Gender was examined, to verify that other/ unknown class could be removed without…

Research Questions

  1. Is there an association between gender and warnings?

  2. Are there other factors that determine if someone gets out of a “ticket”? OR Are you more likely to get a ticket at the end of the month (some believe that police officers have a monthly quota)

Research & Analysis

Question 1: Is there an association between gender and warnings?

To address this question the null and alternative hypothesis are established.

Null Hypothesis: There is no association between gender and violation outcome, warning or citation. This would mean that the likelihood of a violator getting a warning is independent of gender.

Alternative Hypothesis: There is an association between gender and violation outcome. This implies that gender affects the outcome of whether a violator is given a citation or warning.

According to the cleaned and combined dataset for warnings and citation, there was a total of 88,320 records. By looking at the counts for each outcome (citation or warning), there are a lot more citations than there are warnings given out by FCPD. This stacked bar chart also shows that males have a higher count for both categories.

Next, the warning rate for gender is calculated. This looks at the probability of a male or female violator receiving a Warning instead of a citation e.g. getting out of a ticket. To calculate warning rate, the number of warnings are divided by the total number of incidents. \[ \frac{\text{Number of Warnings}}{\text{Total Incidents (Warnings + Citations)}} \]

This shows a slight difference in proportion between the two genders, with females having a higher warning rate than males. In other words, females received more warnings than males. Is this difference significant or is it a result of chance or other factors? To help understand these results, the Chi-Square Test of Independence is used. The Chi-Square Test of Independence will help determine whether the variables, gender and outcome, are independent or if there is a relationship between them.

\[ \chi^2 = \sum \frac{(O-E)^2}{E} \] To implement the Chi-Square Test, a contingency table is generated, which shows the distribution for gender and outcome.

Gender Citations Warnings
Female 20,478 8,777
Male 43,657 15,408

The results of the Chi-Square test shows:

  • Chi-Square Statistic (x-squared): The chi-square test statistic is 150.62. This is the discrepancy between the observed frequencies, citations and warnings, and the expected frequencies if there were no association between the gender and outcome. This is demonstrated in the below tables.
Gender Expected Citations Observed Citations Expected Warnings Observed Warnings
Female 21,243 20,478 8,011 8,777
Male 42,891 43,657 16,173 15,408
  • Degrees of Freedom (df): The degree of freedom for this test is 1, which is the number of rows minus 1 multiplied by number of columns minus 1.

  • p-value: The p-value is 2.2e-16 which is much smaller than 0.05. This represents the probability of observing the chi-square statistic, 150.62, or more if the null hypothesis were true.

To visualize each value in the above table by its contribution to the chi-square test a heatmap is generated. This quickly shows which values have the highest contribution percentage.

Thus the null hypothesis is rejected. The results show that there is a statistically significant association between gender and violation outcome in Fairfax County. In other words, the Chi-square test indicates that the likelihood of a violation outcome is significantly associated with gender.

Another Questions….

To address each of these question, first exploratory analysis should be done to gain an understanding and summary of the crime metrics for Fairfax County. This includes understanding what type of crimes occurred the most and where.

General crime Mapping the arrest data for a geospatial visual of where arrest occur.

Next we look at the Top 10 Arrest Type by Incident Based Reporting (IBR) codes.

Next examining the Top 10 Citations

Warning Versus Citation Next an examination of warning versus citation will be observed… This will help understand what different factors could play into getting a warning or a citation.

Conclusion

References